package com.gohi.core.web.action;

import java.util.Map;
import com.gohi.main.util.global.GloblConfig;


import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.apache.struts2.ServletActionContext;
import com.opensymphony.xwork2.ActionSupport;
public class BaseAction extends ActionSupport {
	protected String alert;// 提示信息
	protected Map session;
	protected String jsonString;
	protected String url;
	protected String static_host = GloblConfig.STATIC_HOST;
	public String getUrl() {
		return url;
	}

	public void setUrl(String url) {
		this.url = url;
	}
	
	public void setJsonString(String jsonString) {
		this.jsonString = jsonString;
	}

	public String getJsonString() {
		return jsonString;
	}

	protected transient final Log logger = LogFactory.getLog(this.getClass());
	
	/** 取得请求 */
	protected HttpServletRequest getRequest() {
		return ServletActionContext.getRequest();
	}

	/** 取得响应 */
	protected HttpServletResponse getResponse() {
		return ServletActionContext.getResponse();
	}

	/** 取得会话 */
	protected HttpSession getSession() {
		return getRequest().getSession();
	}


	
	public void setSession(Map session) {
		this.session = session;
	}

	public String getAlert(){
		return alert;
	}

	public void setAlert(String alert) {
		this.alert = alert;
	}

	public String getStatic_host() {
		return static_host;
	}

	public void setStatic_host(String static_host) {
		this.static_host = static_host;
	}

	

	
}
